package com.by.toolkit.utils;

import cn.hutool.core.util.NumberUtil;
import org.apache.commons.lang3.StringUtils;

/**
 * @author Tian Wei
 * @version 1.0
 * @date 2024/1/29 6:42 PM
 */
public class ByStringUtil {

    public static String extractNumber(String content){

        if (StringUtils.isBlank(content)) {
            return null;
        }
        StringBuffer stringBuffer = new StringBuffer();
        for (String s : content.split("")) {
            if (NumberUtil.isNumber(s)) {
                stringBuffer.append(stringBuffer);
            }
        }
        return stringBuffer.toString();
    }

}
